Cancel an order of promo codes
The request is used to cancel a request to create a series of promo codes.
Note
You can only cancel a series of promo codes if no promo codes from the order were used.
Request syntax
POST https://b2b-api.go.yandex.ru/integration/2.0/promocodes/orders/cancel?order_id={order ID}
Request header
Authorization: Bearer <OAuth-token>
OAuth access token. The steps to get a token are described in Getting started.
X-YaTaxi-Selected-Corp-Client-Id— client ID from the account. Required if multiple clients are available using the token.
Request parameters
The request contains a required parameter:
order_id: ID of the order to cancel.
Response field description
The response contains the field:
|
Field |
Description |
Format |
|
|
The order status. |
String |
Request example
POST https://b2b-api.go.yandex.ru/promocodes/orders/cancel?order_id=099...4e48
...
Authorization: Bearer <OAuth-token>
X-YaTaxi-Selected-Corp-Client-Id: <client-id>
Response example
{
"status": "cancelled"
}
Response codes
The response to this request can contain the following standard HTTP codes:
200: Request completed successfully.400: An unknown parameter or a parameter with an invalid value was passed in the request.403:- SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header
X-YaTaxi-Selected-Corp-Client-Id(returned if more than one client is available for the token). - SELECTED_CLIENT_ACCESS_DENIED: the header
X-YaTaxi-Selected-Corp-Client-Idcontains the client's ID, which this login does not have access to.
- SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header
404: Order not found.409: A conflict occurred.